<div class="ecatalogue_sorting sort_product">
    <:ecatalogue:sort_by:>: 
    <ul class="sort">
    
        <li>
        <a href="javascript:;" title="" class="price_sort"><:ecatalogue:sort_by_price:></a>
            <ul class="sub_sort">
                <li><a href="javascript:;" title="" data-url-part="sort_by=price&sort_order=0" ><:ecatalogue:sort_by_price_asc:></a></li>
                <li><a href="javascript:;" title="" data-url-part="sort_by=price&sort_order=1" ><:ecatalogue:sort_by_price_desc:></a></li>
            </ul>
        </li>
        
        [(#REM) Uncomment sorting by needed fields]
        
        [(#REM) Sort by titre  
        <li>
        <a href="javascript:;" title="" class="price_sort"><:ecatalogue:sort_by_titre:></a>
            <ul class="sub_sort">
                <li><a href="javascript:;" title="" data-url-part="sort_by=titre&sort_order=0" ><:ecatalogue:sort_by_titre_asc:></a></li>
                <li><a href="javascript:;" title="" data-url-part="sort_by=titre&sort_order=1" ><:ecatalogue:sort_by_titre_desc:></a></li>
            </ul>
        </li>
        ]
        
        [(#REM) Sort by sku  
        <li>
        <a href="javascript:;" title="" class="price_sort"><:ecatalogue:sort_by_sku:></a>
            <ul class="sub_sort">
                <li><a href="javascript:;" title="" data-url-part="sort_by=sku&sort_order=0" ><:ecatalogue:sort_by_sku_asc:></a></li>
                <li><a href="javascript:;" title="" data-url-part="sort_by=sku&sort_order=1" ><:ecatalogue:sort_by_sku_desc:></a></li>
            </ul>
        </li>
        ]
    </ul>
</div>
<script type="text/javascript">		
$(document).ready(function() {
    //Dropdown menu
    $('.sort li').find('.sub_sort').hide();
	$('.sort li').hover(
    function() {
        $(this).find('.sub_sort').show();
    }, 
    function() {
        $(this).find('.sub_sort').hide();
    });

    $('.sort_product ul.sub_sort a').click(function(){
	    var url = "<?php echo str_replace("amp;", "","[(#SELF|parametre_url{sort_by|sort_order,''})]"); ?>";         
	    var separator = url.indexOf('?') >= 0 ? '&' : '?';
            window.location = url + separator + $(this).attr('data-url-part');
	});
});
</script>